<?php
$this->pageTitle = Yii::app()->name;
$this->breadcrumbs=array(
	'采购',
);
include_once('menu.php');
?>
<div style="width:100%; float:left; margin-bottom:10px; text-align:right;">
	<form action="" name="jobForm" id="jobForm" method="get">
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="15%" class="td_right"><?php echo $labels['InspectDate']; ?>: </td>
			<td width="50%"><input type="text" name="InspectDate" id="InspectDate" value="<?= $search['InspectDate'] ?>" readonly="readonly" style="width:95px;" />
		<img onclick="displayCalendar(document.jobForm.InspectDate,'yyyymmdd',this)" style="cursor:pointer;" width="25" src="images/calendar.png" /></td>
			<td width="15%" class="td_right">排序: </td>
			<td>
				<?php echo CHtml::dropDownList('order','order',array('InspectDate DESC' => $labels['InspectDate'].' 倒序', 'InspectDate ASC' => $labels['InspectDate'].' 正序', 'ProductDetail Desc' => $labels['ProductDetail'].' 倒序', 'ProductDetail ASC' => $labels['ProductDetail'].' 正序')); ?>
			</td>
		</tr>	
		<tr>
			<td class="td_right"><?php echo $labels['ProductDetail']; ?>: </td>
			<td><input type="text" name="ProductDetail" value="<?php if(isset($search['ProductDetail']))echo $search['ProductDetail'];?>" id="ProductDetail" style="width:300px;" /></td>			
			<td colspan="2" style="text-align:right;"><input type="image" src="images/go.png" name="jobSub" id="jobSub" value="Go" /></td>			
		</tr>
	</table>		
		<input type="hidden" name="r" value="psi/updateBox" />
	</form>
</div>
<form action="" method="post" name="boxBatch" id="boxBatch">
<table cellspacing="0" cellpadding="0" width="100%" class="tbl" style="float:left;">
	<tr class="head">
		<td width="8%"><?php echo $labels['Date']; ?></td>
		<td width="14%"><?php echo $labels['ProductModel']; ?></td>
		<td width="26%"><?php echo $labels['ProductDetail']; ?></td>
		<td width="10%"><?php echo $labels['PQuantity']; ?></td>
		<td width="10%"><?php echo $labels['ToLAQty']; ?></td>		
		<td width="20%"><?php echo $labels['BoxNum']; ?></td>
		<td><?php echo $labels['CarrierNumber']; ?></td>
	</tr>
	<?php
    $i = 0;
    $cssArr = array(0 => 'even', 1 => 'odd', 2 => 'three');
    foreach ($rowTable as $item) {
        $trClass = $cssArr[$i % 3];
        $i++;
        ?>
	<tr class="<?= $trClass ?>">
		<td>
			<?=$item->Date?>
		</td>
		<td>
			<?=$item->ProductModel?>
		</td>
		<td>
			<?=$item->ProductDetail?>
		</td>		
		<td style="text-align:center;">
			<?=$item->PQuantity?>
		</td>	
		<td style="text-align:center;">
			<?php echo CHtml::textField('ToLAQty_'.$item->PricingIndex,$_POST['ToLAQty_'.$item->PricingIndex],array('style'=>'width:50px;')); ?>
		</td>
		<td style="text-align:center;">
			<?php echo CHtml::textField('BoxNum_'.$item->PricingIndex,$_POST['BoxNum_'.$item->PricingIndex],array('style'=>'width:120px;')); ?>
		</td>
		<td style="text-align:center;">
			<?php echo CHtml::textField('CarrierNumber_'.$item->PricingIndex,$_POST['CarrierNumber_'.$item->PricingIndex],array('style'=>'width:70px;')); ?>
		</td>
	</tr>
	<?php
    }
    ?>
	<tr>
		<td colspan="7" style="text-align:center;"><input type="submit" name="boxBatch" value="提交" /></td>
	</tr>
</table>
</form>
